package com.g13.virtualpethospital.controller.response;

import com.g13.virtualpethospital.dto.SessionData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Title: LoginResponse
 * @Author yyj1205
 * @Package com.g13.virtualpethospital.controller.response
 * @Date 24/3/2024 17:38
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("LoginResponse 登录")
public class LoginResponse {
    @ApiModelProperty("正确错误")
    private int code;

    @ApiModelProperty("会话id（之后需要登录才能操作的接口的请求的请求头中需要加入key为session,value为sessionId的键值对），" +
            "请把该字段缓存，因为系统如果忘记了，那就只能重新登录了。")
    private String message;
    public static LoginResponse success(){
        return new LoginResponse(200, "成功");
    }
    public static LoginResponse dataError(){
        return new LoginResponse(400, "数据错误");
    }
    public static LoginResponse notExist(){
        return new LoginResponse(404,"用户不存在");
    }
}
